using System;
using Game.Map;

namespace Game.Controller
{
    public class GameControllerEvents
    {
        public event EventHandler Changed;
        public event EventHandler GameStart;
        public event EventHandler CommandsClear;
        public event EventHandler<MapFieldEventArgs> FieldAttacked;

        internal void FireCommandsClear()
        {
            if (CommandsClear != null)
            {
                CommandsClear(this, new EventArgs());
            }
        }

        internal void FireChanged()
        {
            if (Changed != null)
            {
                Changed(this, new EventArgs());
            }
        }

        internal void FireGameStart()
        {
            if (GameStart != null)
            {
                GameStart(this, new EventArgs());
            }
        }

        public void FireFieldAttacked(IMapField field)
        {
            if (FieldAttacked != null)
            {
                var args = new MapFieldEventArgs(field);
                FieldAttacked(this, args);
            }
        }

    }
}